<?php 
	include_once("../c/config.php");
	$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
	if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
	$sql="SELECT openid FROM `ci3` WHERE `nianji` IS NULL ORDER BY `id`  LIMIT 0,20 ";
	$query=$mysqli->query($sql);
    while ($list =$query->fetch_assoc()){
        $queryu=$mysqli->query("SELECT nianji FROM `u3` where openid='".$list['openid']."' limit 0,1 ");
        if($query->num_rows>0){
            $getU=$queryu->fetch_assoc();
            $nianji=$getU['nianji'];
            echo $nianji;
            $mysqli->query("update `ci3` set nianji='".$nianji."'  where openid='".$list['openid']."' ");
        }
        //var_dump($list);
        echo "<br /><br />";
    }
    $mysqli->close();
?>
<script>
window.setTimeout(function(){
	window.location.reload()
}, 700);
</script>

